package com.lxw.oa.service.serviceImpl;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.lxw.oa.service.ShopService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Transactional
@Service(value = "shopService")
public class ShopServiceImpl implements ShopService {


	@Override
	public List<Map<String,String>> getShList() {
		
		List<Map<String,String>> list=new ArrayList<Map<String,String>>();
		String [] str={"风味","美味","红烧","面","公道","实惠","快餐"};
         for(int i=0;i<15;i++){
        	DecimalFormat decimalFormat=new DecimalFormat(".000000");//构造方法的字符格式这里如果小数不足2位,会以0补足.
     		String lat=decimalFormat.format((float) (31.320860f+(Math.random()*0.001)));
     		String lng=decimalFormat.format((float) (120.587590f+(Math.random()*0.01)));
        	 Map<String,String>map=new HashMap<String,String>();
        	 map.put("name", str[(int)(Math.random()*7)]+str[(int)(Math.random()*7)]+str[(int)(Math.random()*7)]+str[(int)(Math.random()*7)]+str[(int)(Math.random()*7)]+"餐厅");
        	 map.put("count_L", (int)(Math.random()*1000)+"");
        	 map.put("count_E", (int)(Math.random()*1000)+"");
        	 map.put("lat", lat);
        	 map.put("lng", lng);
        	 list.add(map);
         }
		
		return list;
	}
	

}
